<%@ include file="includeTop.jsp"%>
<html>
<head>
<title></title>
<%@ include file="includeTop_head.jsp"%>
</head>
<body>
<table width="100%" align="center" style="padding: 0; margin: 0"
	border=0>
	<tr>
		<td align="center" colspan="3"><%@ include file="user_status.jsp"%></td>
	</tr>

	<tr>
		<td width="10%"></td>
		<td align="center"><%@ include file="title.jsp"%></td>
		<td></td>
	</tr>
	<tr>
		<td align="center" colspan="5"><!-- cart -->
		<table class="step" id="cart" border="0" width="80%" cellspacing="0"
			cellpadding="0">
			<tr>
				<th valign="top" align="center" colspan="100" valign="middle">
				Order ID : <c:out value="${order.orderId}" />&nbsp;&nbsp;&nbsp;&nbsp;Status:
				<c:out value="${order.status}" /></th>
			</tr>
			<tr>
				<td id="itemlist" align="center">
				<div class="ordersub">
				<ul>
					<li>Item List</li>
					<li>
					<table width="98%" class="redlight" align="center" border="1"
						cellspacing="2" cellpadding="5">
						<tr>
							<th>Item ID</th>
							<th>Product Number</th>
							<th>Product</th>
							<th>Quantity</th>
							<th>Unit Price</th>
							<th>Total Cost</th>
						</tr>


						<c:forEach var="orderItem" items="${order.lineItems}">
							<tr height="25">
								<td><b> <a
									href="<c:url value="/shop/viewItem.do"><c:param name="itemId" value="${orderItem.item.itemId}"/></c:url>">
								<c:out value="${orderItem.item.itemId}" /> </a></b></td>
								<td><c:out value="${orderItem.item.product.productNo}" /></td>
								<td><c:out value="${orderItem.item.attribute1}" /> <c:out
									value="${orderItem.item.attribute2}" /> <c:out
									value="${orderItem.item.attribute3}" /> <c:out
									value="${orderItem.item.attribute4}" /> <c:out
									value="${orderItem.item.attribute5}" /> <c:out
									value="${orderItem.item.product.name}" /></td>
								<td align="center"><c:out value="${orderItem.quantity}" /></td>
								<td align="right"><fmt:formatNumber
									value="${orderItem.item.product.unitPrice}" pattern="$#,##0.00" /></td>
								<td align="right"><fmt:formatNumber
									value="${orderItem.totalPrice}" pattern="$#,##0.00" /></td>
							</tr>
						</c:forEach>
					</table>
					</li>
				</ul>
				</div>
				</td>
			</tr>
			<tr>
				<td id="finalTotal" align="center"><spring:bind
					path="order.subTotal">
					<input type="hidden" name="<c:out value="${status.expression}"/>"
						value="<c:out value="${status.value}"/>" />
				</spring:bind> <spring:bind path="order.shippingFee">
					<input type="hidden" name="<c:out value="${status.expression}"/>"
						value="<c:out value="${status.value}"/>" />
				</spring:bind> <spring:bind path="order.totalPrice">
					<input type="hidden" name="<c:out value="${status.expression}"/>"
						value="<c:out value="${status.value}"/>" />
				</spring:bind>
				<div class="ordersub">
				<ul>
					<li>Total</li>
					<li>SubTotal: <fmt:formatNumber value="${order.subTotal}"
						pattern="$#,##0.00" /> + Postage: <fmt:formatNumber
						value="${order.shippingFee}" pattern="$#,##0.00" /> = Total: <font
						color="#ff0000" size="6"><fmt:formatNumber
						value="${order.totalPrice}" pattern="$#,##0.00" /></font></li>
				</ul>
				</div>
				</td>
			</tr>
			<tr>
				<td id="payment" align="center"><%@ include
					file="viewPayAndShipping.jsp"%></td>
			</tr>
			<tr>
				<td id="shipping" align="center"><%@ include
					file="viewAddress.jsp"%></td>
			</tr>
			<tr>
				<td id="comment" align="center">
				<div class="ordersub">
				<ul>
					<li>Additional Comment</li>
					<li>
					<table class="edit" border=0>
						<Tr>
							<td width="400"><spring:bind path="order.comment">
								<textarea rows="4" cols="60"
									name="<c:out value="${status.expression}"/>"><c:out
									value="${status.value}" /></textarea>
							</spring:bind></td>
						</tr>
						<tr><td><input type="submit" value="Add Comment"/></td></tr>
					</table>
					</li>
					<li id="commentTableView" style="display: "></li>
				</ul>
				</div>
				</td>
			</tr>
		</table>
		<!-- cart end --></td>
	</tr>
	<tr>
		<td align="center" colspan="3"><%@ include
			file="includeBottom.jsp"%></td>
	</tr>
</table>
</body>
</html>
